/* static/style.css */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    margin: 0; 
    padding: 0;
    background-color: #f8f9fa; 
    color: #212529; 
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

nav { 
    background-color: #343a40; 
    padding: 12px 0; 
    text-align: center; 
    margin-bottom: 25px; 
    border-radius: 5px 5px 0 0;
}
nav a { 
    margin: 0 18px; 
    color: #f8f9fa; 
    text-decoration: none; 
    font-weight: 500; 
    font-size: 1.1em;
    transition: color 0.3s ease;
}
nav a:hover, nav a.active { 
    color: #17a2b8; /* 浅蓝色高亮 */
    text-decoration: none;
}

hr { 
    border: 0; 
    height: 1px; 
    background-color: #dee2e6; 
    margin: 25px 0; 
}


footer { 
    text-align: center; 
    margin-top: 35px; 
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    color: #6c757d; 
    font-size: 0.9em; 
}

table { 
    border-collapse: collapse; 
    width: 100%; 
    margin-top: 25px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 5px;
    overflow: hidden; /* 配合圆角 */
}
th, td { 
    border-bottom: 1px solid #dee2e6; 
    padding: 12px 15px; 
    text-align: left; 
    vertical-align: middle;
}
th { 
    background-color: #e9ecef; 
    color: #495057; 
    font-weight: 600;
    text-transform: capitalize; /* 首字母大写 */
}
tr:nth-child(even) td { 
    background-color: #f8f9fa; 
}
tr:hover td { 
    background-color: #e2e6ea; 
}

form {
    background-color: #fdfdff;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 25px;
}
form p, form div.form-group { 
    margin-bottom: 18px; 
}
label { 
    display: block; /* 使标签占据一行，输入框在下一行或右侧 */
    margin-bottom: 6px; 
    font-weight: 500;
    color: #495057;
}
input[type="text"], 
input[type="number"], 
input[type="date"], /* 虽然我们用的是 text 来模拟 date，但可以保留 */
textarea, 
select { 
    padding: 10px; 
    border: 1px solid #ced4da; 
    border-radius: 4px; 
    box-sizing: border-box; 
    width: 100%; 
    max-width: 400px; /* 限制输入框最大宽度 */
    font-size: 0.95em;
}
input:focus, textarea:focus, select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}
textarea { 
    min-height: 80px; 
    resize: vertical;
}
button[type="submit"], .button-link { 
    background-color: #007bff; /* 蓝色按钮 */
    color: white; 
    padding: 10px 20px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: background-color 0.2s ease-in-out;
}
button[type="submit"]:hover, .button-link:hover { 
    background-color: #0056b3; 
}
a.button-danger {
    background-color: #dc3545;
}
a.button-danger:hover {
    background-color: #c82333;
}
a.button-secondary {
    background-color: #6c757d;
}
a.button-secondary:hover {
    background-color: #5a6268;
}


.flashes { 
    list-style-type: none; 
    padding: 0; 
    margin: 0 0 20px 0; 
}
.flashes li { 
    padding: 12px 18px; 
    margin-bottom: 10px; 
    border-radius: 4px; 
    font-size: 0.95em; 
    border: 1px solid transparent;
}
.flashes li.success { 
    background-color: #d4edda; color: #155724; border-color: #c3e6cb; 
}
.flashes li.error { 
    background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; 
}
.flashes li.warning { 
    background-color: #fff3cd; color: #856404; border-color: #ffeeba; 
}

h1, h2, h3 { 
    color: #343a40; 
    margin-top: 30px;
    margin-bottom: 15px;
}
h1 { font-size: 2.2em; text-align: center; }
h2 { font-size: 1.8em; border-bottom: 2px solid #eee; padding-bottom: 10px; }
h2:first-child { margin-top: 0; }

/* 用于查询表单的微调 */
.filter-form div {
    display: inline-block; /* 让筛选条件横向排列一些 */
    margin-right: 15px;
    margin-bottom: 10px;
    vertical-align: top;
}
.filter-form div label {
    font-weight: normal;
    font-size: 0.9em;
}
.filter-form div input, .filter-form div select {
    width: auto; /* 让输入框根据内容调整宽度 */
    min-width: 150px;
}
.filter-form button[type="submit"] {
    margin-left: 0; /* 清除左边距，如果筛选条件很多换行了 */
}
